default is all

Andrew Cantino 11 years ago
parent
commit
0ad347c378
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/models/agents/website_agent.rb

+ 2 - 2
app/models/agents/website_agent.rb

@@ -57,7 +57,7 @@ module Agents
57 57
           'expected_update_period_in_days' => "2",
58 58
           'url' => "http://xkcd.com",
59 59
           'type' => "html",
60
-          'mode' => :on_change,
60
+          'mode' => "on_change",
61 61
           'extract' => {
62 62
             'url' => {'css' => "#comic img", 'attr' => "src"},
63 63
             'title' => {'css' => "#comic img", 'attr' => "title"}
@@ -187,7 +187,7 @@ module Agents
187 187
           look_back = UNIQUENESS_LOOK_BACK
188 188
         end
189 189
       end
190
-      events.order("id desc").limit(look_back) if options['mode'].to_s == "on_change"
190
+      events.order("id desc").limit(look_back) if options['mode'].present? && options['mode'].to_s == "on_change"
191 191
     end
192 192
 
193 193
     def extract_full_json?